#include <iostream>
#include "klasy.h"
#include <time.h>

using namespace std;

void funkcjaDlaSlupa(){
	int los;
	Figura* tablica[10];
	Figura::wypisz();
	for (int i = 0; i < 10; i++) {

		los = rand() % 3;
		if (los == 0) {
			 Kolo *kolo = new Kolo(5.01, "slup", 4.03);
			 cout << *kolo<<endl;
			 tablica[i] = kolo;
		}
		else if (los == 1) {
			Kwadrat *kwadrat = new Kwadrat(5.01, "slup", 4.03);
			tablica[i] = kwadrat;
		}
		else if (los == 2) {
			 Prostokat *prostokat = new Prostokat(5.01, "slup", 4.03, 6.78);
			 tablica[i] = prostokat;
		}

	}
	Figura::wypisz();
	for (int i = 0; i < 10; i++) {
		cout << *(tablica[i]) << endl;
	}

	for (int i = 0; i < 10; i++){
		delete tablica[i];
	}
	Figura::wypisz();
}


int main() {
	srand(time(NULL));
	funkcjaDlaSlupa();
	
	
	cin.get();
	return 0;
}